package com.example.handheld4_gsignal_app.data.models;

import com.google.gson.annotations.SerializedName;
import java.util.Date;

/**
 * GPS位置信息数据模型
 */
public class LocationData {
    @SerializedName("latitude")
    private double latitude;
    
    @SerializedName("longitude")
    private double longitude;
    
    @SerializedName("altitude")
    private Double altitude;
    
    @SerializedName("accuracy")
    private Double accuracy;
    
    @SerializedName("timestamp")
    private Date timestamp;

    // 构造函数
    public LocationData() {}

    public LocationData(double latitude, double longitude, Date timestamp) {
        this.latitude = latitude;
        this.longitude = longitude;
        this.timestamp = timestamp;
    }

    public LocationData(double latitude, double longitude, Double altitude, 
                       Double accuracy, Date timestamp) {
        this.latitude = latitude;
        this.longitude = longitude;
        this.altitude = altitude;
        this.accuracy = accuracy;
        this.timestamp = timestamp;
    }

    // Getter和Setter方法
    public double getLatitude() { return latitude; }
    public void setLatitude(double latitude) { this.latitude = latitude; }

    public double getLongitude() { return longitude; }
    public void setLongitude(double longitude) { this.longitude = longitude; }

    public Double getAltitude() { return altitude; }
    public void setAltitude(Double altitude) { this.altitude = altitude; }

    public Double getAccuracy() { return accuracy; }
    public void setAccuracy(Double accuracy) { this.accuracy = accuracy; }

    public Date getTimestamp() { return timestamp; }
    public void setTimestamp(Date timestamp) { this.timestamp = timestamp; }
}